﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="selfdispatch.aspx.cs" Inherits="shop_selfdispatch" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/Banner.ascx" TagPrefix="top" TagName="banner" %>
<%@ Register Src="~/header.ascx" TagName="banner" TagPrefix="uc1" %>
<%@ Register Src="~/Foot.ascx" TagPrefix="foot" TagName="foot" %>
<%@ Register Src="~/shop/Left.ascx" TagName="LeftBanner" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>发给附近配送员-<%= SectionProxyData.GetSetValue(3)%></title>

    <link rel="stylesheet" type="text/css" href="/user/css/user_center.css" />
    <link href="/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <link href="/user/css/common.css?v=2016063025" rel="stylesheet" type="text/css" />
    <link href="/user/css/userinfo.css" rel="stylesheet" />


    <script src="../javascript/jquery-1.8.2.js"></script>

    <script src="../JavaScript/ShowDivDialog.js" type="text/javascript"></script>
    <script src="DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../javascript/jquery.mousetip.js"></script>

    <script src="../javascript/jCommon.js?v=2016070328"></script>

    <script language="javascript" type="text/javascript">


        $(document).ready(function () {
            $("#ahover").hoverTips();
        });

    </script>

</head>
<body>
    <form id="form1" runat="server">
        <top:banner ID="Banner1" runat="server" />
        <uc1:banner ID="Banner2" runat="server" />
        <div class="shop_containner clearfix">
            <uc2:LeftBanner runat="server" ID="Left" />
            <div class="shop_main">
                <div class="main-content">
                    <div class="shop_menu">
                        <ul>
                            <li id="all" class="cur"><a href="javascript:">发给附近配送员</a></li>
                             <li ><a href="buildorder.aspx">门店下单</a></li>
                        </ul>
                    </div>
                    <div class="listorder" style="width: 795px;">

                        <ul>

                            <li>



                                <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px; float: left"
                                    class="condition_table">
                                    <tr>
                                        <td align="right">
                                            <span style="width: 160px;">配送员：</span>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="tbdelivername" runat="server" CssClass="j_text" Width="100px" />
                                        </td>
                                    </tr>


                                </table>

                                <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px; float: left"
                                    class="condition_table">

                                    <tr>
                                        <td align="right">
                                            <span style="width: 160px;">配送员手机： </span>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="tbdeliverphone" runat="server" CssClass="j_text" Width="100px" />
                                        </td>
                                    </tr>




                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px; float: left"
                                    class="condition_table">
                                    <tr>
                                        <td align="right">
                                            <span class="span12" style="width: 160px;">配送员状态：</span>
                                        </td>
                                        <td>

                                            <asp:DropDownList runat="server" ID="ddlworkstate" class="j_select">
                                                <asp:ListItem Text="配送员状态" Value="-1"></asp:ListItem>
                                               
                                                <asp:ListItem Value="10" Text="待岗"></asp:ListItem>
                                                <asp:ListItem Value="20" Text="取货中"></asp:ListItem>
                                                <asp:ListItem Value="30" Text="送货中"></asp:ListItem>
                                              
                                            </asp:DropDownList>

                                            <asp:Button ID="btSearch" runat="server" Text="查询" CssClass="subBtn" OnClick="search_Click" />
                                        </td>
                                    </tr>




                                </table>


                            </li>



                        </ul>

                        <div class=" clear"></div>
                        <div style="margin-top: 20px;">



                            <asp:Button ID="Button1" runat="server" Text="发送给客服" CssClass=" userCommonBtn" OnClientClick="showload_super();"  OnClick="dispatch2Service_Click" />

                            

                            <asp:Button ID="btpremounth" runat="server" Text="自动选择配送员" CssClass=" userCommonBtn" OnClientClick="showload_super();"  OnClick="autodispatch_Click" />

                            <a href="javascript:" id="ahover" tooltips="自动派给1公里内距离最近、没单待岗的骑士">
                                <img src="Images/emotion_question.png" style="vertical-align: middle;" /></a>


                        </div>


                        <div class="clear"></div>



                    </div>
                    <div class="clear"></div>

                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>

                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

                        <ContentTemplate>
                            <div class="usermima">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="listorder_table"
                                    style="border: 1px solid #ccc;">
                                    <asp:Repeater ID="rptOrderList" runat="server" OnItemCommand="rptOrderList_ItemCommand">
                                        <HeaderTemplate>
                                            <tr>
                                                <th style="width: 10%">姓名
                                                </th>
                                                <th style="width: 12%">电话
                                                </th>
                                                <th style="width: 4%">距离
                                                </th>
                                                <th style="width: 4%">手上订单
                                                </th>
                                                <th style="width: 4%">工作状态
                                                </th>
                                                <th style="width: 4%">调度
                                                </th>

                                            </tr>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td style=" line-height:35px;">
                                                    <%# Eval("Name")%>
                                                </td>

                                                <td>
                                                    <%# Eval("Phone")%>
                                                </td>
                                                <td>
                                                    <%#Eval("distance")%>米
                                                </td>
                                                <td>
                                                    <%#Eval("processcount")%>单
                                                </td>
                                                <td>
                                                    <%# Hangjing.WebCommon.WebHelper.TurnWorkstate( Eval("workstate"))%>
                                                   
                                                </td>
                                                <td>

                                                    <asp:Button ID="btdispatch" runat="server" CommandArgument='<%# Eval("dataid")+"_"+Eval("name")+"_"+Eval("Phone")%>' CommandName="dispatch" CssClass=" userCommonBtn" OnClientClick="showload_super();" Text="发给他" />
                                                </td>
                                            </tr>



                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <tr>
                                            </tr>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </table>
                            </div>
                            <div id="noRecord" runat="server" class="no_infor">
                                暂无配送员！
                            </div>
                            <div class="pages">
                                <webdiyer:AspNetPager CssClass="anpager" ID="AspNetPager1" runat="server" Width="100%"
                                    CustomInfoHTML="共有记录 <font>%RecordCount%</font> 条 当前为 <font>%CurrentPageIndex%</font>/<font>%PageCount%</font> 页"
                                    HorizontalAlign="Right" ShowCustomInfoSection="Left" CustomInfoTextAlign="Right"
                                    CustomInfoSectionWidth="28%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox"
                                    TextBeforePageIndexBox="转到 " OnPageChanged="AspNetPager1_PageChanged" PageIndexBoxClass="flattext"
                                    ShowPageIndex="True" PageSize="10" SubmitButtonClass="flatbutton" SubmitButtonText=" GO "
                                    TextAfterPageIndexBox=" 页 " Wrap="False" FirstPageText="首页" LastPageText="尾页"
                                    NextPageText="下一页" PrevPageText="上一页">
                                </webdiyer:AspNetPager>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div>
        <foot:foot runat="server" ID="foot" />
    </form>
</body>
</html>
<script src="../javascript/spin.min.js"></script>
